package com.cyzy.controller;

import com.cyzy.dto.Result;
import com.cyzy.pojo.Attend;
import com.cyzy.service.AttendService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/attend")
public class AttendController {
    @Autowired
    private AttendService attendService;

    @GetMapping("/myAttend")
    public Result myAttend(Attend attend){
        List<Attend> attendList = attendService.myAttend(attend);
        return Result.ok().data("attendList", attendList);
    }
}
